import { ManageCommonAPI } from '@/pages/type';

/** 搜索参数 */
const getHomeSearchList = (queryTypeObj: Record<string, any>) => {
  return [
    {
      name: 'orderType',
      placeholder: '业务名称',
      label: '业务名称',
      componentType: 'Select',
      allowClear: true,
      dataSource: [],
      md: 4,
      sm: 24,
      whetherSenior: false,
      searchParams: {
        fieldType: 'String',
        fieldParam: 1,
        fieldUse: 0,
        searchType: 1,
        seq: 0,
      },
    },
    {
      name: 'readFlag',
      placeholder: '是否已读',
      label: '是否已读',
      componentType: 'Select',
      allowClear: true,
      dataSource: [
        {
          value: 0,
          name: '未读',
        },
        {
          value: 1,
          name: '已读',
        },
      ],
      md: 4,
      sm: 24,
      whetherSenior: false,
      searchParams: {
        fieldType: 'Integer',
        fieldParam: 1,
        fieldUse: 0,
        searchType: 1,
        seq: 0,
      },
    },
    {
      name: queryTypeObj?.params,
      placeholder: '权限参数',
      label: '权限参数',
      componentType: 'QueryParams',
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: false,
      searchParams: {
        fieldType: 'String',
        // fieldParam: 5,
        fieldParam: queryTypeObj?.params == 'ownerID' ? '2' : '3',
        fieldUse: 0,
        searchType: 2,
        seq: 0,
      },
    },
  ];
};

export { getHomeSearchList };
